package com.ftg.learn.buke.test1;

import java.util.Scanner;

/**
 * @author lijiaxin
 * @version 1.0
 * @date 2023/8/15 17:30
 */

public class Demo {
    public static void main(String[] args) {
        Jmz jmz=new Jmz("鸠摩智",903,30,5);
        Qf qf=new Qf("乔峰",1080,25,8);
//        System.out.println(qf.getName()+"打了"+jmz.getName());
//        jmz.deductblood();
//        System.out.println(jmz.getName()+"打了"+qf.getName());
//        qf.deductblood(1);
//
//        System.out.println("鸠摩智触发");
//        jmz.deductblood();

        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入1开始游戏");
        int a=Integer.parseInt(scanner.next());
//        int qb= qf.getBlood();
//        int jmzb=jmz.getBlood();
//        int qg=qf.getAttack();
        for (int count = 0; count < 9; ) {
            if(a==1){
                jmz.say();
                qf.say();
                count+=1;
                if(count!=0){
                    qf.setBlood(qf.getBlood()-jmz.getAttack()+qf.getProtect());
//                    jmzb=jmzb-qf.getAttack()+jmz.getProtect();
                    jmz.setBlood(jmz.getBlood()-qf.getAttack()+jmz.getProtect());
                    if(count==3){
                        System.out.println("没有我鸠摩智，算什么英雄大会");
                        jmz.setBlood(jmz.getBlood()+3);
//                        qb+=3;
                    }
                    if(count==8){
                        System.out.println("算是天王老子 也无权对我发号施令");
//                        qg+=6;
                        qf.setAttack(qf.getAttack()+3);
                    }
                    System.out.println("乔峰血量"+ qf.getBlood());
                    System.out.println("鸠摩智血量"+ jmz.getBlood());
                }
            }
        }
    }
}
